import asyncio
from fastapi import FastAPI
from app.limiter import lifespan
from app.routes.alert import router as alert_router
import funcs

app = FastAPI(lifespan=lifespan)


async def run_conusme():
    funcs.alert_wechat.consume()


@app.on_event("startup")
async def startup():
    asyncio.create_task(run_conusme())


app.include_router(alert_router, tags=["wx告警"])
